Skip to content

Enum Allow None Default#2994

Open
deckar01 wants to merge 1 commit into
devfrom
2985-enum-none
Open

Enum Allow None Default#2994
deckar01 wants to merge 1 commit into
devfrom
2985-enum-none

Conversation

@deckar01

@deckar01 deckar01 commented Jul 7, 2026

Copy link
Copy Markdown
Member

Fixes #2985

If by_value is enabled on an enum with a None value allow_none defaults to True.

Comment thread src/marshmallow/fields.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: Should fields.Enum() accept None when an enum member has value None?

3 participants